package test;

import java.io.File;

import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;

import process.model.AnnotatedPage;
import process.model.lookup.ProductLookup;

public class MenuTesting {

	public static void main(String[] args) throws Exception {
		// OntoQuery ontoQuery = new OntoQuery();
		// List<OntoResource> rs =
		// ontoQuery.getInstanceFromClass("Dàn_Máy_Nghe_Nhạc");
		//
		// for (OntoResource r : rs) {
		// System.out.println(r.getName());
		// }
		//
		// //System.out.println(ontoQuery.getAllInstance());
		// System.out.println(rs.size());
		AnnieProcess annieProcess = new AnnieProcess();
		//String link = "file:///C:/Users/PH/Desktop/Test/nguyenkim.htm";
		String link = "C:/Users/PH/Desktop/Test/thienhoa.htm";
		//String link = "http://www.nguyenkim.com/tivi-man-hinh-lcd/";
		File input = new File(link);
		Document doc = Jsoup.parse(input, "UTF-8", "http://example.com/");
		//System.out.println(doc);
		AnnotatedPage page = annieProcess.annotating(doc);
		for (ProductLookup lookup : page.getProductLookups()) {
			System.out.println("Name:" + lookup.getName() + " / Price:"
					+ lookup.getPrice());
		}
		System.out.println(page.getProductLookups().size());
		System.out.println("DONE!!!!!!!");
	}
}
